package com.tuanzi.loan.web.bean.family.largeamount;

import com.tuanzi.loan.business.entity.family.LoanWholeSaleComment;
import com.tuanzi.loan.business.service.family.LoanLargeAmountPlusRecordService;
import com.tuanzi.loan.vo.request.family.largeamount.LoanStatLargePageDetailRequest;
import com.tuanzi.loan.vo.response.family.largeamount.LoanStatLargePageDetailResponse;
import com.tuanzi.loan.web.configuration.JSFListingBean;
import com.tuanzi.loan.web.lazy.family.largeAmount.StatLargePageDetailLazyDataModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.faces.bean.ViewScoped;
import java.util.List;

/**
 * User: liangZongXi
 * Create time: 15:43 2019/5/27
 * Description:
 */
@Data
@Component
@ViewScoped
@EqualsAndHashCode(callSuper = true)
public class StatLargePageDetailListBean extends JSFListingBean<LoanStatLargePageDetailRequest, LoanStatLargePageDetailResponse> {
    private static final long serialVersionUID = 4230514249134030348L;

    @Autowired
    LoanLargeAmountPlusRecordService loanLargeAmountPlusRecordService;

    @PostConstruct
    private void init(){
        $ = new LoanStatLargePageDetailRequest();
        lazyDataModel = new StatLargePageDetailLazyDataModel($);
    }

    public void onReset(){
        init();
    }

    public List<String> getCFrom(){
        return loanLargeAmountPlusRecordService.getCfrom();
    }

    public List<LoanWholeSaleComment> getTypeOwner(){
        return loanLargeAmountPlusRecordService.getTypeOwnner();
    }
}
